﻿<!DOCTYPE html>

<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8" />
    <title>data</title>
    <script src="../jquery-2.0.3.js"></script>
</head>
<body>
<div id="div1"></div>
    <script>
        (function () {

            $('#div1').data('name', 'hello');
            var data = $('#div1').data('name');
            alert(data);

        })();

    </script>
</body>
</html>